package jtk.project4.fleet.field;

import jtk.project4.fleet.domain.Employee;
import jtk.project4.fleet.domain.Equipment;
import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.field.TextField;
import nl.coderight.jazz.form.field.button.CheckButton;
import nl.coderight.jazz.form.control.CheckControl;
import nl.coderight.jazz.form.control.GroupControl;

public class EquipmentConfigureTrackField extends GroupControl<Equipment>{
	
	private CheckControl trackCheckField ;
	private CheckButton specificationsField ;
	private CheckButton PurchaseField ;
	private CheckButton ExpirationsField ;
	private CheckButton LoanOrLeaseField;
	private CheckButton InsuranceField ;
	private CheckButton TiresField ;
	private CheckButton PhotoField ;
	private CheckButton AttachmentsField ;
	
	public EquipmentConfigureTrackField(String bindID) {
		setTitle("header.equipmentconfiguretrack");
		setBindID(bindID);
		createFields();
		createLayout();
	}
	
	
	private void createFields() {
		trackCheckField = new CheckControl("Track", 8, 8);
		
		specificationsField = new CheckButton("Specifications");
		PurchaseField = new CheckButton("Purchase");
		ExpirationsField = new CheckButton("Expirations");
		LoanOrLeaseField = new CheckButton("Loan/Lease");
		InsuranceField = new CheckButton("Insurance");
		TiresField = new CheckButton("Tires");
		PhotoField = new CheckButton("Photo");
		AttachmentsField = new CheckButton("Attachments");
		
		trackCheckField.addCheckButton(specificationsField, "Specifications");
		trackCheckField.addCheckButton(PurchaseField, "Purchase");
		trackCheckField.addCheckButton(ExpirationsField, "Expirations");
		trackCheckField.addCheckButton(LoanOrLeaseField, "Loan/Lease");
		trackCheckField.addCheckButton(InsuranceField, "Insurance");
		trackCheckField.addCheckButton(TiresField, "Tires");
		trackCheckField.addCheckButton(PhotoField, "Photo");
		trackCheckField.addCheckButton(AttachmentsField, "Attschments");
	}
	private void createLayout() {
		setLayout(new FormLayout())
				
			.addField(trackCheckField) 	.addLabel("")
			/*
			.addLabel("(user defined)")			.addField(custVal2Field)
			.addRow()
			.addLabel("(user defined)")			.addField(custVal3Field)
			.addLabel("(user defined)")			.addField(custVal4Field)
			*/
			;
		
	}
	
	
}
